package com.yupi.springbootinit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yupi.springbootinit.model.entity.UserSignState;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * (UserLoginState)表数据库访问层
 *
 * @author makejava
 * @since 2024-03-07 14:11:04
 */
public interface UserSignStateMapper extends BaseMapper<UserSignState> {

    List<Map<String, Object>> getSignDept(@Param("userId") Long userId);

    List<Map<String, Object>> getSignDetail(@Param("userId") Long userId,@Param("deptId") Integer deptId);

    /**
     * @param id
     * @return
     */
    List<Object> getHistorySign(@Param("userId")Long id);

    List<Object> getNowSign(@Param("userId")Long id);

    List<Object> getFutureSign(@Param("userId")Long id);


    List<Map<String, Object>> signStation(@Param("userId") Long userId,@Param("deptId") Integer deptId);

    Map<String, Object> getSignStateByDate(@Param("queryDate")String queryDate,@Param("userId") Long userId,@Param("deptId") Integer deptId);

    List<Map<String, Object>> selectSignStateByPeriod(@Param("startTime") String startTime, @Param("endTime") String endTime);
}

